package com.pany.rememberpass;

import androidx.appcompat.app.AppCompatActivity;
import androidx.viewpager2.widget.ViewPager2;

import android.os.Bundle;

import com.pany.rememberpass.Adapter.MyLinearLayout;
import com.pany.rememberpass.Adapter.MyViewPagerAdapter2;

public class ViewpagerActivity extends AppCompatActivity {

    private MyLinearLayout mylinearlauout, other_linearlauout;
    private ViewPager2 btn_viewpager2, btn_viewpager;
    private MyViewPagerAdapter2 myViewPagerAdapter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_viewpager);
        mylinearlauout = findViewById(R.id.mylinearlauout);
        other_linearlauout = findViewById(R.id.other_linearlauout);
        btn_viewpager2 = findViewById(R.id.btn_viewpager2);
        btn_viewpager = findViewById(R.id.btn_viewpager);

        mylinearlauout.setOterLinearLayout(other_linearlauout);
        other_linearlauout.setOterLinearLayout(mylinearlauout);

        myViewPagerAdapter = new MyViewPagerAdapter2(this);
        btn_viewpager2.setAdapter(myViewPagerAdapter);
        btn_viewpager.setAdapter(myViewPagerAdapter);

    }

}